package com.mall.implementation;

import com.mall.core.Proposal;
import com.mall.util.StringWrapper;

public class MallOwnerImpl implements com.mall.core.MallOwner {
private CriteriaImpl criteria;
	@Override
	public boolean CheckProposals(Proposal proposal) {
		boolean grantstore=true;
		if(proposal.getNumberofstores()>criteria.getNumberofstore_req()){
			grantstore=false;
		}
		
		for(StringWrapper banneditem :criteria.getBanneditems()){
		if(proposal.getTypeofitemstosell().equals(banneditem)){
			grantstore=false;
		}
		}
return grantstore;
	}
	public void setCriteria(CriteriaImpl criteria){
		this.criteria=criteria;
	}
	public CriteriaImpl getCriteria(){
		return criteria;
	}

}
